package com.nuc.bigdata.orm.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.nuc.bigdata.orm.entity.PhotoNews;
import org.apache.ibatis.annotations.Param;

import java.util.ArrayList;

/**
 * @author JackLuo
 * @date 2019/11/26
 */
public interface PhotoNewsMapper extends BaseMapper<PhotoNews> {
    /**
     * 通过菜单项列出所有资讯
     * @param menuId
     * @return
     */
    ArrayList<PhotoNews> listNewsByMenuId(@Param("menuId")String menuId);

    /**
     * 列出所有资讯
     * @return
     */
    ArrayList<PhotoNews> listNewsAll();

    /**
     * 查询指定资讯
     * @param pnId
     * @return
     */
    PhotoNews selectByPnId(@Param("pnId")String pnId);

    /**
     * 删除指定资讯
     * @param pnId
     */
    void deleteByPnId(@Param("pnId")String pnId);
}
